/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212; /* 深色背景 */
    color: #ffffff; /* 文字颜色 */
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 0 20px; /* 左右内边距 */
    max-width: 600px; /* 最大宽度限制 */
    margin: 0 auto; /* 居中对齐 */
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ff7b00; /* 赛博朋克橙色 */
}

#askForm {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

#askForm input,
#askForm button {
    padding: 10px;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    width: 100%; /* 在小屏幕上全宽 */
    background: #1e1e1e; /* 深色背景 */
    color: #ffffff; /* 白色文字 */
}

#askForm input::placeholder {
    color: #888888; /* 灰色占位符 */
}

#askForm input:focus,
#askForm button:hover {
    box-shadow: 0 0 10px #ff7b00; /* 赛博朋克橙色阴影 */
}

#askForm button {
    background: linear-gradient(90deg, #ff7b00, #ff5f6d); /* 渐变背景 */
    color: #ffffff;
    cursor: pointer;
}

#response {
    margin-top: 20px;
    padding: 15px;
    background-color: #1e1e1e; /* 深色背景 */
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    color: #ffffff; /* 白色文字 */
    user-select: none; /* 禁止文本选择 */
    pointer-events: none; /* 禁用点击事件 */
    text-align: left; /* 左对齐 */
}

/* Markdown 样式 */
#response h1, #response h2, #response h3, #response h4, #response h5, #response h6 {
    color: #ff7b00; /* 赛博朋克橙色 */
    margin-bottom: 10px;
}

#response p {
    margin-bottom: 15px;
}

#response ul, #response ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

#response li {
    margin-bottom: 5px;
}

#response strong, #response b {
    color: #ff7b00; /* 赛博朋克橙色 */
}

#response em, #response i {
    color: #ff7b00; /* 赛博朋克橙色 */
}

#response a {
    color: #ff7b00; /* 赛博朋克橙色 */
    text-decoration: none;
}

#response a:hover {
    text-decoration: underline;
}

/* 加载弹窗样式 */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 确保在最上层 */
}

.loadingSpinner {
    border: 4px solid #f3f3f3; /* 边框颜色 */
    border-top: 4px solid #ff7b00; /* 上边框颜色 */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite; /* 旋转动画 */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#cancelButton {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: #ff7b00; /* 赛博朋克橙色 */
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cancelButton:hover {
    background: #ff5f6d; /* 悬停时的颜色 */
}

/* 关于我的弹窗样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #1e1e1e;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #ff7b00;
    text-decoration: none;
    cursor: pointer;
}

/* 底部小字样式 */
.footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
}

.footer a {
    color: #888888; /* 灰色 */
    text-decoration: none;
    font-size: 0.9rem;
}

.footer a:hover {
    color: #ff7b00; /* 鼠标悬停时的颜色 */
}